home *** CD-ROM | disk | FTP | other *** search
/ Palm Pilot Collection / Palm Pilot Collection (Explore the World of Software) (1998).iso / apps / weather2.exe / citylist.bat < prev    next >
DOS Batch File  |  1997-06-02  |  2KB  |  53 lines

  1. @echo off
  2. REM -- THIS IS CITYLIST.BAT ver. 1.1
  3. REM -- This version adds the explanation of 
  4. REM -- the backslash-s convention for double names.
  5.  
  6. grabwthr Dallas New\sYork Chicago London San\sAntonio Tokyo
  7.  
  8.  
  9.  
  10.  
  11. rem -- Edit or add to the names of cities above for which
  12. rem -- you want to extract the weather forecast.
  13.  
  14. rem -- For names separated by a blank, like New York,
  15. rem -- DOS would treat New and York as separate
  16. rem -- parameters and cause MiniTrue to look for
  17. rem -- all cities beginning with New *and* for 
  18. rem -- all cities beginning with York (if there
  19. rem -- were any). It'll work, but you'll get more
  20. rem -- cities than you want (like New Orleans
  21. rem -- and New Delhi.)
  22.  
  23. rem -- You can't put city names in quotes because
  24. rem -- if you use quotes the quote character itself
  25. rem -- gets matched and everything screws up.
  26.  
  27. rem -- So the trick is to put something between
  28. rem -- the two words to cause DOS to treat them as a 
  29. rem -- single parameter, but that won't screw up MiniTrue's 
  30. rem -- string search function. The backslash-s 
  31. rem -- characters (\s) do the trick because in the 
  32. rem -- world of string search-and-replace processors,
  33. rem -- backslash-s means "whitespace" or blanks.
  34.  
  35. rem -- Alternatively, you can specify the full name 
  36. rem -- of the city by editing the
  37. rem -- GRABWTHR.BAT file. See that file for
  38. rem -- examples of how it can be done. If you are
  39. rem -- going to want to get weather for double-named 
  40. rem -- cities like New York regularly, then you
  41. rem -- might just want to edit that file.
  42. rem -- 
  43. rem -- If a city appears more than once in the 
  44. rem -- PointCast files, like "Chicago," which has 
  45. rem -- entries for both of the Chicago airports,
  46. rem -- you will get both listings. New York also
  47. rem -- has two listings, by the way.
  48.  
  49. rem -- This whole thing works by string matches at the 
  50. rem -- beginning of the city name, so putting in
  51. rem -- "S" (without the quotes) instead of "Seattle" 
  52. rem -- will get all cities that begin with "S".
  53.